package com.buaa.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@SuppressWarnings("serial")
@Entity
@Table(name = "longjiang_industry")
@DynamicInsert(true)
@DynamicUpdate(true)
public class LongjiangIndustry implements Serializable {

	@Column(name = "type", columnDefinition = "char(4) default ''")
	private String type; // 1. 类型

	@Id
	@Column(name = "code", columnDefinition = "char(5)")
	private String code; // 2. 代码

	@Column(name = "name", columnDefinition = "varchar(10) default ''")
	private String name; // 3. 名称

	@Column(name = "parent_code", columnDefinition = "char(1) default ''")
	private String parent_code; // 4. 上级代码

	@Column(name = "level", columnDefinition = "tinyint(4) default -1")
	private Integer level; // 5.级别

	public LongjiangIndustry() {
		super();
	}

	public LongjiangIndustry(String type, String code, String name, String parent_code, Integer level) {
		super();
		this.type = type;
		this.code = code;
		this.name = name;
		this.parent_code = parent_code;
		this.level = level;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getParent_code() {
		return parent_code;
	}

	public void setParent_code(String parent_code) {
		this.parent_code = parent_code;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Override
	public String toString() {
		return "LongjiangIndustry [type=" + type + ", code=" + code + ", name=" + name + ", parent_code=" + parent_code
				+ ", level=" + level + "]";
	}

}
